1000
It is possible to clip the bar's caption to bar, when the time scale is changed

With G2antt1
	.Columns.Add "Task"
	With .Chart
		.PaneWidth(False) = 48
		.FirstVisibleDate = #12/27/2000#
		With .Bars.Item("Task")
			.Pattern = 32
			.Height = 13
		End With
	End With
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K1","This is a bit of text that get's clipped"
		.ItemBar(h,"K1",4) = 4
		.ItemBar(h,"K1",6) = .ItemBar(h,"K1",3)
		h = .AddItem("Task 2")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K1","This is a bit of text that is not clipped"
		.ItemBar(h,"K1",4) = 1
	End With
End With
999
How can I change the color for all bars with the key matching a pattern

With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 64
	.Debug = True
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"A"
		.AddBar h,"Task",#1/5/2001#,#1/7/2001#,"B1"
		.AddBar h,"Task",#1/8/2001#,#1/17/2001#,"B2"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K3"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"B4"
		.ItemBar(0,"<B*>",33) = 255
	End With
End With
998
How can I change the color for all bars in the same item with the key matching a pattern

With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 64
	.Debug = True
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"A"
		.AddBar h,"Task",#1/5/2001#,#1/7/2001#,"B1"
		.AddBar h,"Task",#1/8/2001#,#1/17/2001#,"B2"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K3"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K4"
		.ItemBar(h,"<B*>",33) = 255
	End With
End With
997
How can I change the color for all bars in the same item

With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar h,"Task",#1/5/2001#,#1/7/2001#,"K2"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K3"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K4"
		.ItemBar(h,"<*>",33) = 255
	End With
End With
996
How can I write a special number for each date related to a bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 32
		.LevelCount = 2
	End With
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/13/2001#,"1"
	End With
	With .Chart.Notes
		With .Add("N1",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = "S+2"
			.PartText(0) = "4"
			.PartFixedWidth(0) = 18
			.PartHOffset(0) = -9
			.PartBackColor(0) = RGB(255,255,0)
			.ShowLink = 0
			.PartVisible(0) = True
		End With
		With .Add("N2",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = "S+3"
			.PartText(0) = "4"
			.PartFixedWidth(0) = 18
			.PartHOffset(0) = -9
			.PartBackColor(0) = RGB(255,255,0)
			.ShowLink = 0
			.PartVisible(0) = True
		End With
		With .Add("N3",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = "S+4"
			.PartText(0) = "5"
			.PartFixedWidth(0) = 18
			.PartHOffset(0) = -9
			.PartBackColor(0) = RGB(0,255,0)
			.ShowLink = 0
			.PartVisible(0) = True
		End With
		With .Add("N4",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = "S+5"
			.PartText(0) = "5"
			.PartFixedWidth(0) = 18
			.PartHOffset(0) = -9
			.PartBackColor(0) = RGB(0,255,0)
			.ShowLink = 0
			.PartVisible(0) = True
		End With
		With .Add("N5",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = "S+6"
			.PartText(0) = "8"
			.PartFixedWidth(0) = 18
			.PartHOffset(0) = -9
			.PartBackColor(0) = RGB(255,0,0)
			.ShowLink = 0
			.PartVisible(0) = True
		End With
		With .Add("Z",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = "E"
			.PartText(0) = "4"
			.PartFixedWidth(0) = 18
			.PartHOffset(0) = -9
			.PartBackColor(0) = RGB(255,128,0)
			.PartCanMove(0) = True
			.ShowLink = 0
			.PartVisible(0) = True
		End With
	End With
	.EndUpdate 
End With
995
How can I assign a note to be always in the center of the bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1"
	End With
	With .Chart.Notes
		With .Add("Note",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = 0.5
			.PartText(0) = "note<br>center"
			.PartBackColor(0) = RGB(255,255,0)
			.PartVisible(1) = False
			.ShowLink = 0
		End With
	End With
	.EndUpdate 
End With
994
How can I assign a note relative to the start of the bar, and let it be movable

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1"
	End With
	With .Chart.Notes
		With .Add("Note",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = "S+1"
			.PartText(0) = "<%d%>"
			.PartFixedWidth(0) = 18
			.PartHOffset(0) = 9
			.PartCanMove(0) = True
			.PartBackColor(0) = RGB(255,255,0)
			.PartVisible(1) = False
			.ShowLink = 0
		End With
	End With
	.EndUpdate 
End With
993
How can I associate a note relative to the start of the bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1"
	End With
	With .Chart.Notes
		With .Add("Note",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = "S+1"
			.PartText(0) = "<%d%>"
			.PartFixedWidth(0) = 18
			.PartHOffset(0) = 9
			.PartBackColor(0) = RGB(255,255,0)
			.PartVisible(1) = False
			.ShowLink = 0
		End With
	End With
	.EndUpdate 
End With
992
How can I associate a note relative to the end of the bar, so if the bar is resized at the end, the not is moved accordingly

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1"
	End With
	With .Chart.Notes
		With .Add("Note",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = "E-1"
			.PartText(0) = "<%d%>"
			.PartFixedWidth(0) = 18
			.PartHOffset(0) = 9
			.PartVisible(1) = False
			.ShowLink = 0
		End With
	End With
	.EndUpdate 
End With
991
How can I associate a note relative to the end of the bar, so if the bar is resized at the end, the not is moved accordingly

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1"
	End With
	With .Chart.Notes
		With .Add("Note",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = 1
			.PartText(0) = "End"
			.PartVisible(1) = False
			.ShowLink = 0
		End With
	End With
	.EndUpdate 
End With
990
How can I hide a bar without removing it
With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.LevelCount = 2
	End With
	.HeaderVisible = 1
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#,"B1"
		.AddBar .AddItem("Item 2"),"Task",#1/6/2001#,#1/14/2001#,"B2"
		.AddLink "L1",.FindItem("Item 1",0),"B1",.FindItem("Item 2",0),"B2"
		.ItemBar(.FirstVisibleItem,.FirstItemBar(.FirstVisibleItem),19) = 100
	End With
	.EndUpdate 
End With
989
How can I align the caption in the note

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1"
	End With
	With .Chart.Notes
		With .Add("N1",G2antt1.Items.FirstVisibleItem,"1","")
			.ShowLink = 0
			.PartVisible(1) = False
			.PartText(0) = "S <b><%dd%></b>"
			.PartFixedWidth(0) = 48
			.PartAlignment(0) = 0
			.PartVOffset(0) = 17
		End With
		With .Add("N2",G2antt1.Items.FirstVisibleItem,"1","")
			.RelativePosition = 1
			.ShowLink = 0
			.PartVisible(1) = False
			.PartText(0) = "E <b><%dd%></b>"
			.PartFixedWidth(0) = 48
			.PartAlignment(0) = 2
			.PartVOffset(0) = 17
		End With
	End With
	.EndUpdate 
End With
988
How I can assign a note and let user move the note relative to the bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1"
	End With
	With .Chart.Notes
		With .Add("Note",G2antt1.Items.FirstVisibleItem,"1","End")
			.PartText(0) = "Day<br> <%dd%>"
			.PartCanMove(0) = True
			.PartVOffset(0) = 16
			.PartTransparency(0) = 30
			.PartToolTip(0) = "Click the note and start moving to a new position."
		End With
	End With
	.EndUpdate 
End With
987
How can I assign a picture as a note associated with a bar

With G2antt1
	.BeginUpdate 
	.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
	.HTMLPicture("pic2") = "c:\exontrol\images\auction.gif"
	.AntiAliasing = True
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1"
		h = .AddItem("Task 2")
		.AddBar h,"Task",#1/7/2001#,#1/11/2001#,"2"
	End With
	With .Chart.Notes
		With .Add("1",G2antt1.Items.ItemByIndex(0),"1","<img>pic1</img>")
			.PartShadow(1) = False
			.PartBorderSize(1) = 0
			.ClearPartBackColor 1
			.PartHOffset(1) = -64
			.PartCanMove(1) = True
		End With
		With .Add("2",G2antt1.Items.ItemByIndex(1),"2","<img>pic2</img>")
			.PartShadow(1) = False
			.PartBorderSize(1) = 0
			.ClearPartBackColor 1
			.RelativePosition = 1
			.PartCanMove(1) = True
			.LinkColor = RGB(255,0,0)
			.LinkWidth = 2
			.LinkStyle = 2
			.ShowLink = 1
		End With
	End With
	.EndUpdate 
End With
986
How can I assign a picture as a note associated with a bar

With G2antt1
	.BeginUpdate 
	.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
	.AntiAliasing = True
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1"
		h = .AddItem("Task 2")
		.AddBar h,"Task",#1/7/2001#,#1/11/2001#,"2"
	End With
	With .Chart.Notes
		With .Add("1",G2antt1.Items.ItemByIndex(0),"1","<img>1</img>")
			.PartShadow(1) = False
			.PartBorderSize(1) = 0
			.ClearPartBackColor 1
		End With
		With .Add("2",G2antt1.Items.ItemByIndex(1),"2","<img>2</img>...<img>3</img>")
			.PartShadow(1) = False
			.PartBorderSize(1) = 0
			.ClearPartBackColor 1
			.RelativePosition = 1
			.PartCanMove(1) = True
			.LinkColor = RGB(255,0,0)
			.LinkWidth = 2
			.LinkStyle = 2
		End With
	End With
	.EndUpdate 
End With
985
How can I put a box assigned to a DATE

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Item 1")
		h = .AddItem("Item 2")
	End With
	With .Chart.Notes
		With .Add("D1",G2antt1.Items.FirstVisibleItem,G2antt1.Chart.FirstVisibleDate,"Date:<br><%dd%>/<%mm%><br><b><%yyyy%></b>")
			.PartCanMove(1) = True
			.PartVOffset(1) = 20
			.PartHOffset(1) = 20
		End With
		With .Add("D2",G2antt1.Items.NextVisibleItem(G2antt1.Items.FirstVisibleItem),#1/7/2001#,"Date:<br><%dd%>/<%mm%><br><b><%yyyy%></b>")
			.PartVisible(0) = True
			.PartText(0) = "<b><%d%></b>"
			.PartCanMove(1) = True
			.PartVOffset(1) = 20
			.PartHOffset(1) = 20
		End With
	End With
	.EndUpdate 
End With
984
How can I add a note or a box associated with a bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"1","Center"
		.ItemBar(h,"1",44) = "left"
		.ItemBar(h,"1",45) = 16
		h = .AddItem("Task 2")
		.AddBar h,"Task",#1/7/2001#,#1/11/2001#,"2","Center"
		.ItemBar(h,"2",44) = "right"
		.ItemBar(h,"2",45) = 18
	End With
	With .Chart.Notes
		.Add "1S",G2antt1.Items.FirstVisibleItem,"1","Start"
		.Add("1F",G2antt1.Items.FirstVisibleItem,"1","End").RelativePosition = 1
	End With
	.EndUpdate 
End With
983
Is it possible to define different working hours for every week day

With G2antt1
	.BeginUpdate 
	With .Chart
		.PaneWidth(0) = 14
		.NonworkingDays = 0
		.NonworkingHours = 0
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		With .Level(0)
			.Alignment = 1
			.Label = "<%dddd%>"
		End With
		With .Level(1)
			.Label = "<%hh%>"
			.Count = 6
		End With
		.UnitWidth = 16
	End With
	.Columns.Add ""
	With .Items
		h = .AddItem(1)
		.ItemNonworkingUnits(h,False) = "weekday(value) != 1 or (weekday(value) = 1 and not ( hour(value) >= 9 and hour(value) <= 14 ))"
		h = .AddItem(2)
		.ItemNonworkingUnits(h,False) = "weekday(value) = 2 and ( hour(value) >= 9 and hour(value) <= 14 )"
		h = .AddItem(3)
		.ItemNonworkingUnits(h,False) = "weekday(value) = 3"
	End With
	.EndUpdate 
End With
982
How can I automatically update the exBarPercent value using a slider control

With G2antt1
	.BeginUpdate 
	.Items.AllowCellValueToItemBar = True
	With .Chart
		.FirstVisibleDate = #1/1/2002#
		.PaneWidth(False) = 128
		.Bars.Add("Task%Progress").Shortcut = "Percent"
	End With
	With .Columns.Add("Percent")
		.Def(18) = 518
		.Def(19) = "P"
	End With
	With .Items
		i = .AddItem(0)
		.CellBold(i,0) = True
		.CellEditor(i,0).EditType = 20
		.AddBar i,"Percent",#1/2/2002#,#1/6/2002#,"P"
		.ItemBar(i,"P",14) = True
		.CellValue(i,0) = 50
	End With
	.EndUpdate 
End With
981
Is there any automatic way to change a property for all bars in the chart
With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Items
		.AddBar .AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K2"
		.AddBar .AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K3"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K4"
		.ItemBar(0,"<*>",33) = 255
	End With
End With
980
How can I assign an icon to a bar and I get notified when I click it

With G2antt1
	.BeginUpdate 
	.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/5/2001#,#1/10/2001#,"","Caption"
		.ItemBar(h,"",44) = "<a1><img>1:8</img></a><a1><img>2</img></a>"
		.ItemBar(h,"",45) = 16
		.ItemBar(h,"",47) = 5
	End With
	.EndUpdate 
End With
979
How can I assign an icon to a bar so I do not break its caption

With G2antt1
	.BeginUpdate 
	.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/5/2001#,#1/10/2001#,"","Caption"
		.ItemBar(h,"",44) = "<img>1</img>"
		.ItemBar(h,"",45) = 16
		.ItemBar(h,"",47) = 5
		.ItemBar(h,"",48) = 2
	End With
	.EndUpdate 
End With
978
How can I assign multiple lables to the same bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#1/5/2001#,#1/7/2001#,"","Right"
		.ItemBar(h1,"",4) = 18
		.AddBar h1,"",#1/5/2001#,#1/5/2001#,"T1","Left"
		.ItemBar(h1,"T1",4) = 16
		.AddBar h1,"",#1/5/2001#,#1/7/2001#,"T2","Center"
		.GroupBars h1,"",True,h1,"T1",True
		.GroupBars h1,"",True,h1,"T1",False
		.GroupBars h1,"",True,h1,"T2",True
		.GroupBars h1,"",False,h1,"T2",False
	End With
	.EndUpdate 
End With
977
Is there any way to have more Captions on a bar than one

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#1/5/2001#,#1/7/2001#,"","Right"
		.ItemBar(h1,"",4) = 18
		.AddBar h1,"",#1/5/2001#,#1/5/2001#,"T1","Left"
		.ItemBar(h1,"T1",4) = 16
		.GroupBars h1,"",True,h1,"T1",True
		.GroupBars h1,"",True,h1,"T1",False
	End With
	.EndUpdate 
End With
976
How can I assign multiple lables to the same bar at once

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 96
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/5/2001#,#1/8/2001#,"","Center"
		.ItemBar(h,"",44) = "left"
		.ItemBar(h,"",45) = 16
		h = .AddItem("Task 2")
		.AddBar h,"Task",#1/7/2001#,#1/11/2001#,"","Center"
		.ItemBar(h,"",44) = "right"
		.ItemBar(h,"",45) = 18
	End With
	.EndUpdate 
End With
975
How can I limit the duration or length of the bar
With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.ScrollRange(0) = #1/1/2001#
	.Chart.ScrollRange(1) = #1/7/2001#
	.Chart.PaneWidth(0) = 128
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Item 1")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#
		.ItemBar(h,"",36) = 2
		.ItemBar(h,"",37) = 5
		.ItemBar(h,"",3) = "Min=2 / Max=5"
		.ItemBar(h,"",4) = 18
	End With
	.EndUpdate 
End With
974
I have an EBN file how can I apply different colors to it, so no need to create a new one

With G2antt1
	.VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn"
	.SelBackColor = .BackColor
	.SelForeColor = .ForeColor
	.HasLines = 0
	.Columns.Add "Default"
	With .Items
		h = .AddItem("Root")
		hC = .InsertItem(h,,"Default")
		.ItemBackColor(hC) = &H1000000
		.ItemHeight(.InsertItem(h,,"")) = 6
		hC = .InsertItem(h,,"Light Green")
		.ItemBackColor(hC) = &H100ff00
		G2antt1.Chart.ItemBackColor(hC) = &H100ff00
		.ItemHeight(.InsertItem(h,,"")) = 6
		hC = .InsertItem(h,,"Dark Green")
		.ItemBackColor(hC) = &H1007f00
		.ItemHeight(.InsertItem(h,,"")) = 6
		hC = .InsertItem(h,,"Magenta")
		.ItemBackColor(hC) = &H1ff7fff
		.ItemHeight(.InsertItem(h,,"")) = 6
		hC = .InsertItem(h,,"Yellow")
		.ItemBackColor(hC) = &H17fffff
		.ItemHeight(.InsertItem(h,,"")) = 6
		.ExpandItem(h) = True
	End With
End With
973
I need to specify the non-working hours for about 100 days for each item, but the scrolling is very slow. Is there any option to increase the speed

With G2antt1
	.BeginUpdate 
	.AllowChartScrollPage = True
	.Columns.Add "Non-Work"
	With .Chart
		.FirstVisibleDate = #4/4/2009 4:00:00 PM#
		.PaneWidth(False) = 52
		.LevelCount = 2
		.UnitWidth = 16
		With .Level(0)
			.Label = "<r><%d%>-<%mmm%>"
			.Unit = 4096
		End With
		With .Level(1)
			.Label = "<%hh%>"
			.Unit = 65536
			.Count = 2
		End With
	End With
	With .Items
		.AddItem "Default"
		.ItemNonworkingUnits(.AddItem("Test"),False) = "date(shortdate(value)) case(default:0;#4/5/2009# : hour(value) >= 6 and hour(value) <= 12; #4/6/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #4/7/2009# : hour(value) >= 6 and hour(value) <= 12; #4/8/2009# : hour(value) >= 6 and hour(value) <= 12; #4/9/" & _
"2009# : hour(value) >= 6 and hour(value) <= 12; #4/10/2009# : hour(value) >= 6 and hour(value) <= 12; #4/11/2009# : hour(value) " & _
">= 6 and hour(value) <= 12; #4/12/2009# : hour(value) >= 6 and hour(value) <= 12; #4/13/2009# : hour(value) >= 6 and hour(value)" & _
" <= 12; #4/14/2009# : hour(value) >= 6 and hour(value) <= 12; #4/15/2009# : hour(value) >= 6 and hour(value) <= 12; #4/16/2009# " & _
": hour(value) >= 6 and hour(value) <= 12; #4/17/2009# : hour(value) >= 6 and hour(value) <= 12; #4/18/2009# : hour(value) >= 6 a" & _
"nd hour(value) <= 12; #4/19/2009# : hour(value) >= 6 and hour(value) <= 12; #4/20/2009# : hour(value) >= 6 and hour(value) <= 12" & _
"; #4/21/2009# : hour(value) >= 6 and hour(value) <= 12; #4/22/2009# : hour(value) >= 6 and hour(value) <= 12; #4/23/2009# : hour" & _
"(value) >= 6 and hour(value) <= 12; #4/24/2009# : hour(value) >= 6 and hour(value) <= 12; #4/25/2009# : hour(value) >= 6 and hou" & _
"r(value) <= 12; #4/26/2009# : hour(value) >= 6 and hour(value) <= 12; #4/27/2009# : hour(value) >= 6 and hour(value) <= 12; #4/2" & _
"8/2009# : hour(value) >= 6 and hour(value) <= 12; #4/29/2009# : hour(value) >= 6 and hour(value) <= 12; #4/30/2009# : hour(value" & _
") >= 6 and hour(value) <= 12; #5/1/2009# : hour(value) >= 6 and hour(value) <= 12; #5/2/2009# : hour(value) >= 6 and hour(value)" & _
" <= 12; #5/3/2009# : hour(value) >= 6 and hour(value) <= 12; #5/4/2009# : hour(value) >= 6 and hour(value) <= 12; #5/5/2009# : h" & _
"our(value) >= 6 and hour(value) <= 12; #5/6/2009# : hour(value) >= 6 and hour(value) <= 12; #5/7/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #5/8/2009# : hour(value) >= 6 and hour(value) <= 12; #5/9/2009# : hour(value) >= 6 and hour(value) <= 12; #5/10" & _
"/2009# : hour(value) >= 6 and hour(value) <= 12; #5/11/2009# : hour(value) >= 6 and hour(value) <= 12; #5/13/2009# : hour(value)" & _
" >= 6 and hour(value) <= 12; #5/14/2009# : hour(value) >= 6 and hour(value) <= 12; #5/15/2009# : hour(value) >= 6 and hour(value" & _
") <= 12; #5/16/2009# : hour(value) >= 6 and hour(value) <= 12; #5/17/2009# : hour(value) >= 6 and hour(value) <= 12; #5/18/2009#" & _
" : hour(value) >= 6 and hour(value) <= 12; #5/19/2009# : hour(value) >= 6 and hour(value) <= 12; #5/20/2009# : hour(value) >= 6 " & _
"and hour(value) <= 12; #5/21/2009# : hour(value) >= 6 and hour(value) <= 12; #5/22/2009# : hour(value) >= 6 and hour(value) <= 1" & _
"2; #5/23/2009# : hour(value) >= 6 and hour(value) <= 12; #5/24/2009# : hour(value) >= 6 and hour(value) <= 12; #5/25/2009# : hou" & _
"r(value) >= 6 and hour(value) <= 12; #5/26/2009# : hour(value) >= 6 and hour(value) <= 12; #5/27/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #5/28/2009# : hour(value) >= 6 and hour(value) <= 12; #5/29/2009# : hour(value) >= 6 and hour(value) <= 12; #5/" & _
"30/2009# : hour(value) >= 6 and hour(value) <= 12; #5/31/2009# : hour(value) >= 6 and hour(value) <= 12; #6/1/2009# : hour(value" & _
") >= 6 and hour(value) <= 12; #6/2/2009# : hour(value) >= 6 and hour(value) <= 12; #6/3/2009# : hour(value) >= 6 and hour(value)" & _
" <= 12; #6/4/2009# : hour(value) >= 6 and hour(value) <= 12; #6/5/2009# : hour(value) >= 6 and hour(value) <= 12; #6/6/2009# : h" & _
"our(value) >= 6 and hour(value) <= 12; #6/7/2009# : hour(value) >= 6 and hour(value) <= 12; #6/8/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #6/9/2009# : hour(value) >= 6 and hour(value) <= 12; #6/10/2009# : hour(value) >= 6 and hour(value) <= 12; #6/1" & _
"1/2009# : hour(value) >= 6 and hour(value) <= 12; #6/12/2009# : hour(value) >= 6 and hour(value) <= 12; #6/13/2009# : hour(value" & _
") >= 6 and hour(value) <= 12; #6/14/2009# : hour(value) >= 6 and hour(value) <= 12; #6/15/2009# : hour(value) >= 6 and hour(valu" & _
"e) <= 12; #6/16/2009# : hour(value) >= 6 and hour(value) <= 12; #6/17/2009# : hour(value) >= 6 and hour(value) <= 12; #6/18/2009" & _
"# : hour(value) >= 6 and hour(value) <= 12; #6/19/2009# : hour(value) >= 6 and hour(value) <= 12; #6/21/2009# : hour(value) >= 6" & _
" and hour(value) <= 12; #6/22/2009# : hour(value) >= 6 and hour(value) <= 12; #6/23/2009# : hour(value) >= 6 and hour(value) <= " & _
"12; #6/24/2009# : hour(value) >= 6 and hour(value) <= 12; #6/25/2009# : hour(value) >= 6 and hour(value) <= 12; #6/26/2009# : ho" & _
"ur(value) >= 6 and hour(value) <= 12; #6/27/2009# : hour(value) >= 6 and hour(value) <= 12; #6/28/2009# : hour(value) >= 6 and h" & _
"our(value) <= 12; #6/29/2009# : hour(value) >= 6 and hour(value) <= 12; #6/30/2009# : hour(value) >= 6 and hour(value) <= 12; #7" & _
"/1/2009# : hour(value) >= 6 and hour(value) <= 12; #7/2/2009# : hour(value) >= 6 and hour(value) <= 12; #7/3/2009# : hour(value)" & _
" >= 6 and hour(value) <= 12; #7/4/2009# : hour(value) >= 6 and hour(value) <= 12; #7/5/2009# : hour(value) >= 6 and hour(value) " & _
"<= 12; #7/6/2009# : hour(value) >= 6 and hour(value) <= 12; #7/7/2009# : hour(value) >= 6 and hour(value) <= 12; #7/8/2009# : ho" & _
"ur(value) >= 6 and hour(value) <= 12; #7/9/2009# : hour(value) >= 6 and hour(value) <= 12; #7/10/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #7/11/2009# : hour(value) >= 6 and hour(value) <= 12; #7/12/2009# : hour(value) >= 6 and hour(value) <= 12; #7/" & _
"13/2009# : hour(value) >= 6 and hour(value) <= 12; #7/14/2009# : hour(value) >= 6 and hour(value) <= 12)"
		.ItemNonworkingUnits(.AddItem("Test"),False) = "date(shortdate(value)) case(default:0;#4/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/6" & _
"/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/7/2009# : hour(value) >= 6 and hour(value) <" & _
"= 10 or hour(value) in (16,17,20,21); #4/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/9/" & _
"2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/10/2009# : hour(value) >= 6 and hour(value) <" & _
"= 10 or hour(value) in (16,17,20,21); #4/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/1" & _
"2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/13/2009# : hour(value) >= 6 and hour(value)" & _
" <= 10 or hour(value) in (16,17,20,21); #4/14/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4" & _
"/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/16/2009# : hour(value) >= 6 and hour(valu" & _
"e) <= 10 or hour(value) in (16,17,20,21); #4/17/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); " & _
"#4/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/19/2009# : hour(value) >= 6 and hour(va" & _
"lue) <= 10 or hour(value) in (16,17,20,21); #4/20/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21)" & _
"; #4/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/22/2009# : hour(value) >= 6 and hour(" & _
"value) <= 10 or hour(value) in (16,17,20,21); #4/23/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,2" & _
"1); #4/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/25/2009# : hour(value) >= 6 and hou" & _
"r(value) <= 10 or hour(value) in (16,17,20,21); #4/26/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20" & _
",21); #4/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/28/2009# : hour(value) >= 6 and h" & _
"our(value) <= 10 or hour(value) in (16,17,20,21); #4/29/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17," & _
"20,21); #4/30/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/1/2009# : hour(value) >= 6 and " & _
"hour(value) <= 10 or hour(value) in (16,17,20,21); #5/2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17," & _
"20,21); #5/3/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/4/2009# : hour(value) >= 6 and h" & _
"our(value) <= 10 or hour(value) in (16,17,20,21); #5/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,2" & _
"0,21); #5/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/7/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 10 or hour(value) in (16,17,20,21); #5/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20" & _
",21); #5/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/10/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 10 or hour(value) in (16,17,20,21); #5/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,2" & _
"0,21); #5/13/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/14/2009# : hour(value) >= 6 and " & _
"hour(value) <= 10 or hour(value) in (16,17,20,21); #5/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17" & _
",20,21); #5/16/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/17/2009# : hour(value) >= 6 an" & _
"d hour(value) <= 10 or hour(value) in (16,17,20,21); #5/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16," & _
"17,20,21); #5/19/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/20/2009# : hour(value) >= 6 " & _
"and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (1" & _
"6,17,20,21); #5/22/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/23/2009# : hour(value) >= " & _
"6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in " & _
"(16,17,20,21); #5/25/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/26/2009# : hour(value) >" & _
"= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) i" & _
"n (16,17,20,21); #5/28/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/29/2009# : hour(value)" & _
" >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/30/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value)" & _
" in (16,17,20,21); #5/31/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/1/2009# : hour(value" & _
") >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value)" & _
" in (16,17,20,21); #6/3/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/4/2009# : hour(value)" & _
" >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) " & _
"in (16,17,20,21); #6/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/7/2009# : hour(value) " & _
">= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) i" & _
"n (16,17,20,21); #6/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/10/2009# : hour(value) " & _
">= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) " & _
"in (16,17,20,21); #6/12/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/13/2009# : hour(value" & _
") >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/14/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value" & _
") in (16,17,20,21); #6/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/16/2009# : hour(val" & _
"ue) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/17/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(val" & _
"ue) in (16,17,20,21); #6/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/19/2009# : hour(v" & _
"alue) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(v" & _
"alue) in (16,17,20,21); #6/22/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/23/2009# : hour" & _
"(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour" & _
"(value) in (16,17,20,21); #6/25/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/26/2009# : ho" & _
"ur(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/27/2009# : hour(value) >= 6 and hour(value) <= 10 or ho" & _
"ur(value) in (16,17,20,21); #6/28/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/29/2009# : " & _
"hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/30/2009# : hour(value) >= 6 and hour(value) <= 10 or " & _
"hour(value) in (16,17,20,21); #7/1/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/2/2009# : " & _
"hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/3/2009# : hour(value) >= 6 and hour(value) <= 10 or h" & _
"our(value) in (16,17,20,21); #7/4/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/5/2009# : h" & _
"our(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/6/2009# : hour(value) >= 6 and hour(value) <= 10 or ho" & _
"ur(value) in (16,17,20,21); #7/7/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/8/2009# : ho" & _
"ur(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hou" & _
"r(value) in (16,17,20,21); #7/10/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/11/2009# : h" & _
"our(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/12/2009# : hour(value) >= 6 and hour(value) <= 10 or h" & _
"our(value) in (16,17,20,21); #7/13/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/14/2009# :" & _
" hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21))"
		.AddItem "Default"
	End With
	.EndUpdate 
End With
972
How can I use the CASE statement (CASE usage)
With G2antt1
	.BeginUpdate 
	With .Columns.Add("Value")
		.Width = 24
		.Editor.EditType = 4
	End With
	With .Columns.Add("CASE - statment")
		.ComputedField = "%0 case (default:'not found';1:%0;2:2*%0;3:3*%0;4:4*%0;5:5*%0;7:'Seven';8:'Eight';9:'Nine';11:'Eleven';13:'Thirtheen';14:'Fourt" & _
"heen')"
		.ToolTip = .ComputedField
	End With
	With .Items
		.AddItem 0
		.AddItem 1
		.AddItem 2
	End With
	.EndUpdate 
End With
971
How can I use the CASE statement (CASE usage)
With G2antt1
	.BeginUpdate 
	With .Columns.Add("Value")
		.Width = 24
		.Editor.EditType = 4
	End With
	With .Columns.Add("CASE - statment")
		.ComputedField = "%0 case (default:'not found';1:'One';2:'Two';3:'Three';4:'Four';5:'Five';7:'Seven';8:'Eight';9:'Nine';11:'Eleven';13:'Thirtheen" & _
"';14:'Fourtheen')"
		.ToolTip = .ComputedField
	End With
	With .Items
		.AddItem 0
		.AddItem 1
		.AddItem 2
	End With
	.EndUpdate 
End With
970
I have seen the IN function but it returns -1 or 0. How can I display the value being found ( SWITCH usage )
With G2antt1
	.BeginUpdate 
	With .Columns.Add("Value")
		.Width = 24
		.Editor.EditType = 4
	End With
	With .Columns.Add("SWITCH - statment")
		.ComputedField = "%0 switch ('not found', 1,2,3,4,5,7,8,9,11,13,14)"
		.ToolTip = .ComputedField
	End With
	With .Items
		.AddItem 0
		.AddItem 1
		.AddItem 2
	End With
	.EndUpdate 
End With
969
I have a large collection of constant values and using or operator is a time consuming (IN usage). Is there any way to increase the speed to check if a value maches the collection
With G2antt1
	.BeginUpdate 
	With .Columns.Add("Value")
		.Width = 24
		.Editor.EditType = 4
	End With
	With .Columns.Add("IN - statment")
		.ComputedField = "%0 in (1,2,3,4,5,7,8,9,11,13,14) ? 'found' : ''"
		.ToolTip = .ComputedField
	End With
	With .Items
		.AddItem 0
		.AddItem 1
		.AddItem 2
	End With
	.EndUpdate 
End With
968
How can I automatically update the exBarPercent value using a slider control

With G2antt1
	.BeginUpdate 
	.Items.AllowCellValueToItemBar = True
	With .Chart
		.FirstVisibleDate = #1/1/2002#
		.PaneWidth(False) = 128
		.Bars.Add("Task%Progress").Shortcut = "Percent"
	End With
	With .Columns.Add("Percent")
		.Def(18) = 12
		.Def(19) = "P"
	End With
	With .Items
		i = .AddItem(0)
		.CellBold(i,0) = True
		With .CellEditor(i,0)
			.EditType = 20
			.Option(42) = 0.01
			.Option(40) = 0.01
			.Option(44) = 1
			.Option(41) = -100
		End With
		.CellValueFormat(i,0) = 1
		.AddBar i,"Percent",#1/2/2002#,#1/6/2002#,"P"
		.ItemBar(i,"P",14) = True
		.CellValue(i,0) = 0.5
	End With
	.EndUpdate 
End With
967
How can I automatically update the exBarPercent value using a spin control

With G2antt1
	.BeginUpdate 
	.Items.AllowCellValueToItemBar = True
	With .Chart
		.FirstVisibleDate = #1/1/2002#
		.PaneWidth(False) = 128
		.Bars.Add("Task%Progress").Shortcut = "Percent"
	End With
	With .Columns.Add("Percent")
		.Def(18) = 12
		.FormatColumn = "((0:=round(dbl(%0)*100)) >= 50 ? '<font 8>'+ =:0 + '%</font>' : '<fgcolor=808080><font 6>'+ =:0 + '%</font></fgcolor>')"
	End With
	With .Items
		i = .AddItem(0)
		.CellBold(i,0) = True
		With .CellEditor(i,0)
			.EditType = 4
			.Option(40) = 0.01
			.Option(44) = 1
		End With
		.CellValueFormat(i,0) = 1
		.AddBar i,"Percent",#1/2/2002#,#1/6/2002#
		.CellValue(i,0) = 0.5
	End With
	.EndUpdate 
End With
966
How do I specify for an item all units as being non-working units

With G2antt1
	.BeginUpdate 
	.AllowChartScrollPage = True
	.Columns.Add "Non-Work"
	With .Chart
		.AllowCreateBar = 1
		.FirstVisibleDate = #4/3/2009 10:00:00 AM#
		.PaneWidth(False) = 64
		.LevelCount = 2
		.UnitWidth = 16
		With .Level(0)
			.Label = "<r><%d%>-<%mmm%>"
			.Unit = 4096
		End With
		With .Level(1)
			.Label = "<%hh%>"
			.Unit = 65536
			.Count = 2
		End With
	End With
	With .Items
		.AddItem "Default"
		.ItemNonworkingUnits(.AddItem("All-Non-Working"),False) = "1"
		.AddItem "Default"
	End With
	.EndUpdate 
End With
965
How do I specify for an item all units as being working units

With G2antt1
	.BeginUpdate 
	.AllowChartScrollPage = True
	.Columns.Add "Non-Work"
	With .Chart
		.AllowCreateBar = 1
		.FirstVisibleDate = #4/3/2009 10:00:00 AM#
		.PaneWidth(False) = 64
		.LevelCount = 2
		.UnitWidth = 16
		With .Level(0)
			.Label = "<r><%d%>-<%mmm%>"
			.Unit = 4096
		End With
		With .Level(1)
			.Label = "<%hh%>"
			.Unit = 65536
			.Count = 2
		End With
	End With
	With .Items
		.AddItem "Default"
		.ItemNonworkingUnits(.AddItem("All-Working"),False) = "0"
		.AddItem "Default"
	End With
	.EndUpdate 
End With
964
How can I programmatically specify different non-working units ( days, hours ) for different items

With G2antt1
	.BeginUpdate 
	.AllowChartScrollPage = True
	.Columns.Add "Non-Work"
	With .Chart
		.AllowCreateBar = 1
		.Bars.Add("Task:Split").Shortcut = "Task"
		.FirstVisibleDate = #7/13/2009 0:00:00 PM#
		.PaneWidth(False) = 52
		.LevelCount = 2
		.UnitWidth = 16
		With .Level(0)
			.Label = "<r><b><%d%></b> <%mmm%> <%yyyy%>"
			.Unit = 4096
		End With
		With .Level(1)
			.Label = "<%hh%>"
			.Unit = 65536
			.Count = 2
		End With
	End With
	With .Items
		h = .AddItem("Item 1")
		.ItemNonworkingUnits(h,False) = "(shortdate(value) = #7/14/2009# and hour(value) >= 6 and hour(value) <= 12)"
		.AddBar h,"Task",#7/14/2009 4:00:00 AM#,#7/14/2009 2:00:00 PM#
		h = .AddItem("Item 2")
		.ItemNonworkingUnits(h,False) = "(((hour(value) >= 4 and hour(value) <= 16) or hour(value) = 2) and month(value) = 7) or ((hour(value) >= 2 and hour(value) < 10" & _
")) and month(value) = 6 or weekday(value) = 6"
		.AddBar h,"Task",#7/14/2009 1:00:00 AM#,#7/14/2009 6:00:00 AM#
	End With
	.EndUpdate 
End With
963
I am programmatically select a date using the Chart.SelectDate property, but can't see why the date is not highlighted. What am I doing wrong
With G2antt1
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2001#
		.SelectLevel = 1
		.SelectDate(#1/4/2001#) = True
	End With
End With
962
How do I show a shorter line in the chart's level

With G2antt1
	.BeginUpdate 
	.GridLineColor = RGB(128,128,128)
	With .Chart
		.DrawLevelSeparator = 0
		.UnitWidth = 24
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(0) = 0
		.LevelCount = 2
		With .Level(0)
			.Alignment = 1
			.Label = "<%dddd%>"
			.DrawTickLines = 18 ' LevelLineEnum.exLevelLowerHalf Or LevelLineEnum.exLevelSolidLine
		End With
		With .Level(1)
			.Label = 65536
			.Count = 6
			.DrawTickLines = 578 ' &H200 Or LevelLineEnum.exLevelMiddleLine Or LevelLineEnum.exLevelSolidLine
			.DrawTickLinesFrom 0,34 ' LevelLineEnum.exLevelUpperHalf Or LevelLineEnum.exLevelSolidLine
		End With
	End With
	.EndUpdate 
End With
961
How do I replicate the screen shot http://www.exontrol.com/images/exg2antt9.jpg

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 1,"C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\headdark.ebn"
		.Add 2,"C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\xpbsel.ebn"
		.Add 3,"C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\headligh.ebn"
		.Add 4,"CP:1 0 0 1 1"
	End With
	.BackColorHeader = &H4000000
	.Chart.BackColorLevelHeader = &H4000000
	.SelBackColor = &H20000ff
	.GridLineColor = RGB(128,128,128)
	.HeaderHeight = 22
	.SelForeColor = RGB(0,0,0)
	.MarkSearchColumn = False
	.ScrollBySingleLine = False
	.ShowFocusRect = False
	.DefaultItemHeight = 48
	With .Columns
		With .Add("Group")
			.Def(0) = True
			.Def(4) = 50331648
			.LevelKey = 1
		End With
		With .Add("Histogram")
			.Width = 18
			.AllowSizing = False
			.LevelKey = 1
			.Position = 0
		End With
	End With
	With .Chart
		.FirstVisibleDate = #6/11/2009#
		.DrawGridLines = -1
		.PaneWidth(False) = 96
		.LevelCount = 2
		.DrawLevelSeparator = False
		With .Level(0)
			.Label = "<%mmmm%> <%yyyy%>"
			.Unit = 16
			.Alignment = 1
		End With
		With .Level(1)
			.FormatLabel = "weekday(dvalue)=1?value:''"
			.DrawTickLines = 18 ' LevelLineEnum.exLevelLowerHalf Or LevelLineEnum.exLevelSolidLine
			.DrawTickLinesFrom 0,2
			.Alignment = 1
		End With
		With .Bars.Item("Task")
			.Color = &H2000000
			.Height = 18
			.OverlaidType = 515 ' OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or OverlaidBarsTypeEnum.exOverlaidBarsStack
			.HistogramColor = &H1000000
			.HistogramType = 1
		End With
		.HistogramVisible = True
		.HistogramHeight = 48
		.HistogramView = 4
	End With
	With .Items
		h = .AddItem("Group <b>A</b>")
		.CellValueFormat(h,0) = 1
		.CellMerge(h,0) = 1
		.AddBar h,"Task",#6/12/2009#,#6/19/2009#,"K1","Requirements"
		.AddBar h,"Task",#6/13/2009#,#6/21/2009#,"K2","Sales & Marketing"
		.ItemBar(h,"K1",33) = 255
		.ItemBar(h,"K2",33) = 255
		.CellState(h,0) = 1
		h = .AddItem("Group <b>B</b>")
		.CellValueFormat(h,0) = 1
		.CellMerge(h,0) = 1
		.AddBar h,"Task",#6/14/2009#,#6/23/2009#,"K1","<b>GUI</b> Design"
		.AddBar h,"Task",#6/18/2009#,#6/25/2009#,"K2","Class Design"
		h = .AddItem("Group <b>C</b>")
		.CellValueFormat(h,0) = 1
		.CellMerge(h,0) = 1
		.AddBar h,"Task",#6/12/2009#,#6/19/2009#,"K1","<b>GUI</b> Coding"
		.AddBar h,"Task",#6/13/2009#,#6/25/2009#,"K2","Design & Concept"
		.ItemBar(h,"K1",33) = 65280
		.ItemBar(h,"K2",33) = 65280
	End With
	.EndUpdate 
End With
960
How can I remove all bars from the chart
With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Items
		.AddBar .AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K2"
		.ClearBars 0
	End With
End With
959
How can I change the color for all bars with a specified key
With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Items
		.AddBar .AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K2"
		.ItemBar(0,"K1",33) = 255
	End With
End With
958
Is there any automatic way to change a property for all bars with a specified key
With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Items
		.AddBar .AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K2"
		.ItemBar(0,"K1",33) = 255
	End With
End With
957
How can I remove all bars with specified key
With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Items
		.AddBar .AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K1"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K2"
		.RemoveBar 0,"K1"
	End With
End With
956
How do I several bars with different vertical offsets

With G2antt1
	.Chart.FirstVisibleDate = #1/1/2001#
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Item")
		.ItemHeight(h) = 62
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"T1"
		.ItemBar(h,"T1",18) = -23
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"T2"
		.ItemBar(h,"T2",18) = -11
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"T3"
		.ItemBar(h,"T3",18) = 1
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"T4"
		.ItemBar(h,"T4",18) = 13
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"T5"
		.ItemBar(h,"T5",18) = 25
	End With
End With
955
Is there any option to show gradient bars without using EBN technology

With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Chart.Bars.Item("Task")
		.Color = RGB(255,0,0)
		.StartColor = RGB(0,255,0)
		.EndColor = RGB(255,255,0)
		.Pattern = 32
	End With
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,""
	End With
End With
954
How can I define a bar with border and solid filling

With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Chart.Bars.Item("Task")
		.Color = RGB(255,0,0)
		.StartColor = RGB(255,255,0)
		.EndColor = RGB(255,255,0)
		.Pattern = 32
	End With
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,""
	End With
End With
953
How can I define a bar with border and solid filling

With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Chart.Bars.Item("Task")
		.Color = RGB(255,0,0)
		.Pattern = 32
		.Height = 18
	End With
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,""
		.ItemBar(h,"",7) = 65535
	End With
End With
952
How do I define a bar with solid border and filling

With G2antt1
	.VisualAppearance.Add 1,"C:\Program Files\Exontrol\ExG2antt.NET\sample\EBN\blackboxt.ebn"
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Chart.Bars.Item("Task")
		.Color = &H1000000
		.Height = 18
	End With
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,""
		.ItemBar(h,"",33) = 255
		.ItemBar(h,"",7) = 65535
	End With
End With
951
Can I control the units/resource/effort being allocated to a bar when displaying OverAllocation histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Effort")
		.Def(18) = 21
		.Editor.EditType = 4
	End With
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(False) = 96
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 202
		.HistogramView = 112
		With .Bars.Item("Task")
			.HistogramPattern = 2050 ' PatternEnum.exRectangularCurve Or PatternEnum.exPatternDot
			.HistogramType = 1
			.HistogramCriticalValue = 50
			.HistogramGridLinesColor = RGB(192,192,192)
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
	End With
	With .Items
		.AllowCellValueToItemBar = True
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/21/2005#,#6/25/2005#
		.CellValue(h1,1) = 2
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task",#6/24/2005#,#6/28/2005#
		.CellValue(h1,1) = 1
		h1 = .AddItem("Task 3")
		.AddBar h1,"Task",#6/27/2005#,#7/1/2005#
		.CellValue(h1,1) = 2
		h1 = .AddItem("Task 4")
		.AddBar h1,"Task",#6/30/2005#,#7/2/2005#
		.CellValue(h1,1) = 1
	End With
	.EndUpdate 
End With
950
Can I control the units/resource/effort being allocated to a bar when displaying Overload histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Effort")
		.Def(18) = 21
		.Editor.EditType = 4
	End With
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(False) = 96
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 128
		.HistogramView = 112
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern ' .Pattern
			.HistogramType = 0
			.HistogramCriticalValue = 3
			.ShowHistogramValues = "value>3?255:1"
			.HistogramItems = -11
			.HistogramGridLinesColor = RGB(192,192,192)
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
	End With
	With .Items
		.AllowCellValueToItemBar = True
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/21/2005#,#6/23/2005#
		.CellValue(h1,1) = 4
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task",#6/24/2005#,#6/26/2005#
		.CellValue(h1,1) = 3
		h1 = .AddItem("Task 3")
		.AddBar h1,"Task",#6/27/2005#,#6/29/2005#
		.CellValue(h1,1) = 2
		h1 = .AddItem("Task 4")
		.AddBar h1,"Task",#6/30/2005#,#7/2/2005#
		.CellValue(h1,1) = 1
	End With
	.EndUpdate 
End With
949
How can I display double-lines curves in the histogram

With G2antt1
	.AntiAliasing = True
	With .Chart
		.PaneWidth(False) = 48
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 64
		With .Bars.Item("Task")
			.HistogramPattern = 512
			.HistogramItems = 3
			.HistogramBorderColor = RGB(128,0,0)
			.HistogramColor = RGB(255,0,0)
		End With
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#
	End With
End With
948
Is there any option to display values in the histogram using different colors

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		With .Bars.Item("Task")
			.HistogramPattern = 6
			.HistogramItems = 6
			.ShowHistogramValues = "value>1?255:65280"
		End With
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 1"),"Task",#1/3/2001#,#1/7/2001#
	End With
End With
947
Is there any option to display values in the histogram using different colors

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		With .Bars.Item("Task")
			.HistogramPattern = 6
			.HistogramItems = 6
			.ShowHistogramValues = "value>1?255:1"
		End With
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 1"),"Task",#1/3/2001#,#1/7/2001#
	End With
End With
946
How can I display only few values in the histogram, such as the values greater than a value

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		With .Bars.Item("Task")
			.HistogramPattern = 6
			.ShowHistogramValues = "value>1"
		End With
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 1"),"Task",#1/3/2001#,#1/7/2001#
	End With
End With
945
How can I display values in the histogram

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		With .Bars.Item("Task")
			.HistogramPattern = 6
			.ShowHistogramValues = "1"
		End With
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 1"),"Task",#1/3/2001#,#1/7/2001#
	End With
End With
944
How can I scroll the chart to find a bar
With G2antt1
	.Columns.Add "Column"
	.Chart.LevelCount = 2
	.Chart.PaneWidth(0) = 64
	.DefaultItemHeight = 32
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#,1
		.AddBar .AddItem("Item 2"),"Task",#1/2/2001#,#1/4/2001#,2
		.AddBar .AddItem("Item 3"),"Task",#1/2/2001#,#1/4/2001#,3
		.AddBar .AddItem("Item 4"),"Task",#1/2/2001#,#1/4/2001#,4
		.AddBar .AddItem("Item 5"),"Task",#1/2/2001#,#1/4/2001#,5
		.AddBar .AddItem("Item 6"),"Task",#1/2/2001#,#1/4/2001#,6
		.AddBar .AddItem("Item 7"),"Task",#1/2/2001#,#1/4/2001#,7
		.AddBar .AddItem("Item 8"),"Task",#1/2/2001#,#1/4/2001#,8
		.AddBar .AddItem("Item 9"),"Task",#1/2/2001#,#1/4/2001#,8
		.AddBar .AddItem("Item 10"),"Task",#1/2/2001#,#1/4/2001#,10
		.AddBar .AddItem("Item 11"),"Task",#1/2/2001#,#1/4/2001#,11
		.AddBar .AddItem("Item 12"),"Task",#1/2/2001#,#1/4/2001#,12
		.AddBar .AddItem("Item 13"),"Task",#1/2/2001#,#1/4/2001#,13
		.AddBar .AddItem("Item 14"),"Task",#1/2/2001#,#1/4/2001#,14
	End With
	h = .Items.FindBar(14)
	.Items.EnsureVisibleItem h
	.Chart.ScrollTo G2antt1.Items.ItemBar(h,14,1),1
End With
943
Can I change the color/marker/frame for selected bars

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 2,"c:\exontrol\images\normal.ebn"
		.Add 1,"CP:2 3 2 -3 -2"
	End With
	With .Chart
		.FirstVisibleDate = #1/1/2002#
		.SelBarColor = &H1000000
		.PaneWidth(0) = 48
	End With
	.Columns.Add "Task"
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2002#,#1/4/2002#,"A"
		.AddBar h,"Task",#1/6/2002#,#1/10/2002#,"B"
		.AddBar h,"Task",#1/11/2002#,#1/14/2002#,"C"
		.ItemBar(h,"A",257) = True
		.ItemBar(h,"B",257) = True
	End With
	.EndUpdate 
End With
942
Can I display a larger marker for selected bars, eventually using the EBN technology

With G2antt1
	.BeginUpdate 
	.VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn"
	With .Chart
		.FirstVisibleDate = #1/1/2002#
		.SelBarColor = &H1000000
		.PaneWidth(0) = 48
	End With
	.Columns.Add "Task"
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2002#,#1/4/2002#,"A"
		.AddBar h,"Task",#1/6/2002#,#1/10/2002#,"B"
		.AddBar h,"Task",#1/11/2002#,#1/14/2002#,"C"
		.ItemBar(h,"A",257) = True
		.ItemBar(h,"B",257) = True
	End With
	.EndUpdate 
End With
941
How do I change the color for the selected bars

With G2antt1
	.BeginUpdate 
	.Debug = True
	With .Chart
		.FirstVisibleDate = #1/1/2002#
		.SelBarColor = RGB(255,0,0)
		.PaneWidth(0) = 48
	End With
	.Columns.Add "Task"
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2002#,#1/4/2002#,"A"
		.AddBar h,"Task",#1/6/2002#,#1/10/2002#,"B"
		.AddBar h,"Task",#1/11/2002#,#1/14/2002#,"C"
		.ItemBar(h,"A",257) = True
		.ItemBar(h,"B",257) = True
	End With
	.EndUpdate 
End With
940
How can I change the background color for child bars of a summary bar

With G2antt1
	.BeginUpdate 
	.LinesAtRoot = -1
	.HasLines = False
	With .Chart
		.AllowCreateBar = False
		.AllowLinkBars = False
		.FirstVisibleDate = #1/1/2008#
		.LevelCount = 2
		.PaneWidth(0) = 112
	End With
	.Columns.Add ""
	With .Items
		hR1 = .AddItem("Team 1")
		.AddBar hR1,"Summary",#1/2/2008#,#1/8/2008#,""
		.ItemBar(hR1,"",34) = 12895428
		h1 = .InsertItem(hR1,,"Member 1")
		.AddBar h1,"Task",#1/2/2008#,#1/7/2008#
		.DefineSummaryBars hR1,"",h1,""
		h1 = .InsertItem(hR1,,"Member 2")
		.AddBar h1,"Task",#1/4/2008#,#1/9/2008#
		.DefineSummaryBars hR1,"",h1,""
		h1 = .InsertItem(hR1,,"Member 3")
		.AddBar h1,"Task",#1/5/2008#,#1/10/2008#
		.DefineSummaryBars hR1,"",h1,""
		.ExpandItem(hR1) = True
	End With
	.EndUpdate 
End With
939
How can I allow resizing the bar only in the right part of the bar
With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K1"
		.ItemBar(h,"K1",10) = 2
	End With
End With
938
How can I allow resizing the bar only in the left part of the bar
With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K1"
		.ItemBar(h,"K1",10) = 1
	End With
End With
937
How can I show the links that starts from selected bar being more visible, while the rest being transparent

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.PaneWidth(0) = 64
		.ShowLinksWidth(1) = 2
		.ShowLinksStyle(1) = 2
		.ShowLinksColor(2) = RGB(200,200,200)
		.ShowLinksColor(4) = RGB(200,200,200)
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#9/21/2006#,#9/23/2006#
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#9/25/2006#,#9/27/2006#
		.ItemBar(h2,"",257) = True
		.AddLink "L1",h1,"",h2,""
		.Link("L1",12) = "L1"
		h3 = .AddItem("Task 3")
		.AddBar h3,"Task",#9/29/2006#,#10/2/2006#
		.AddLink "L2",h2,"",h3,""
		.Link("L2",12) = "L2"
	End With
	.EndUpdate 
End With
936
How can I show only the links that starts from selected bar

With G2antt1
	.BeginUpdate 
	.MarkSearchColumn = False
	.OnResizeControl = 1
	.Columns.Add "Tasks"
	.Columns.Add("Start").Visible = False
	.Columns.Add("End").Visible = False
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.PaneWidth(0) = 64
		.ShowLinksColor(2) = .BackColor
		.ShowLinksColor(4) = .BackColor
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.CellValue(h1,1) = #9/21/2006#
		.CellValue(h1,2) = #9/24/2006#
		.AddBar h1,"Task",.CellValue(h1,1),.CellValue(h1,2)
		h2 = .InsertItem(h,,"Task 2")
		.CellValue(h2,1) = #9/25/2006#
		.CellValue(h2,2) = #9/28/2006#
		.AddBar h2,"Task",.CellValue(h2,1),.CellValue(h2,2)
		.ItemBar(h2,"",257) = True
		.AddLink "L1",h1,"",h2,""
		h3 = .InsertItem(h,,"Task 3")
		.CellValue(h3,1) = #9/29/2006#
		.CellValue(h3,2) = #10/2/2006#
		.AddBar h3,"Task",.CellValue(h3,1),.CellValue(h3,2)
		.AddLink "L2",h2,"",h3,""
	End With
	.EndUpdate 
End With
935
How can I hide links that are not related to selected bar

With G2antt1
	.BeginUpdate 
	.MarkSearchColumn = False
	.OnResizeControl = 1
	.Columns.Add "Tasks"
	.Columns.Add("Start").Visible = False
	.Columns.Add("End").Visible = False
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.PaneWidth(0) = 64
		.ShowLinksColor(4) = .BackColor
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.CellValue(h1,1) = #9/21/2006#
		.CellValue(h1,2) = #9/24/2006#
		.AddBar h1,"Task",.CellValue(h1,1),.CellValue(h1,2)
		.ItemBar(h1,"",257) = True
		h2 = .InsertItem(h,,"Task 2")
		.CellValue(h2,1) = #9/25/2006#
		.CellValue(h2,2) = #9/28/2006#
		.AddBar h2,"Task",.CellValue(h2,1),.CellValue(h2,2)
		.AddLink "L1",h1,"",h2,""
		h3 = .InsertItem(h,,"Task 3")
		.CellValue(h3,1) = #9/29/2006#
		.CellValue(h3,2) = #10/2/2006#
		.AddBar h3,"Task",.CellValue(h3,1),.CellValue(h3,2)
		.AddLink "L2",h2,"",h3,""
	End With
	.EndUpdate 
End With
934
How can I show the direction of the link using EBN files

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 1,"c:\exontrol\images\normal.ebn"
		.Add 2,"CP:1 -1 -1 1 1"
		.Add 3,"CP:1 -2 -2 2 2"
	End With
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
	End With
	.Columns.Add "Column"
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"B1"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/5/2001#,#1/13/2001#,"B2"
		.AddLink "L1",h1,"B1",h2,"B2"
		.Link("L1",14) = 16777216
		h2 = .AddItem("Task 3")
		.AddBar h2,"Task",#1/5/2001#,#1/13/2001#,"B3"
		.AddLink "L2",h1,"B1",h2,"B3"
		.Link("L2",14) = 33554432
		h2 = .AddItem("Task 4")
		.AddBar h2,"Task",#1/5/2001#,#1/13/2001#,"B5"
		.AddLink "L3",h1,"B1",h2,"B5"
		.Link("L3",14) = 50331648
	End With
	.EndUpdate 
End With
933
How can I show round links

With G2antt1
	.Chart.FirstVisibleDate = #1/1/2001#
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#,"B1"
		.AddBar .AddItem("Item 2"),"Task",#1/5/2001#,#1/13/2001#,"B2"
		.AddLink "L1",.FindItem("Item 1",0),"B1",.FindItem("Item 2",0),"B2"
		.Link("L1",15) = True
	End With
End With
932
How can I change the color to display the arrow of the link

With G2antt1
	.Chart.FirstVisibleDate = #1/1/2001#
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#,"B1"
		.AddBar .AddItem("Item 2"),"Task",#1/6/2001#,#1/14/2001#,"B2"
		.AddLink "L1",.FindItem("Item 1",0),"B1",.FindItem("Item 2",0),"B2"
		.Link("L1",14) = 255
	End With
End With
931
I use UnitScale: exHour and I want to show only from 9 to 18 hour. The idea is to show only the working part of a day. Is this possible

With G2antt1
	.BeginUpdate 
	With .Chart
		.MarkTodayColor = .BackColor
		.BackColorLevelHeader = RGB(255,255,255)
		.PaneWidth(0) = 0
		.LevelCount = 2
		With .Level(0)
			.Label = "<b><%dddd%></b> <%d%>"
			.Alignment = 1
			.DrawTickLines = 0
		End With
		With .Level(1)
			.Label = 65536
			.DrawTickLines = 65 ' LevelLineEnum.exLevelMiddleLine Or LevelLineEnum.exLevelDotLine
			.DrawTickLinesFrom 0,1
		End With
		.NonworkingHours = 16253439
		.ShowNonworkingUnits = False
		.ShowNonworkingDates = False
		.ShowNonworkingHours = False
	End With
	.EndUpdate 
End With
930
Can I display tick lines from other level to my base level so time units gets separated more clearly

With G2antt1
	.BeginUpdate 
	With .Chart
		.DrawLevelSeparator = 0
		.UnitWidth = 24
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(0) = 0
		.LevelCount = 2
		With .Level(0)
			.Alignment = 1
			.Label = "<%dddd%>"
			.DrawTickLines = 18 ' LevelLineEnum.exLevelLowerHalf Or LevelLineEnum.exLevelSolidLine
		End With
		With .Level(1)
			.Label = 65536
			.Count = 6
			.DrawTickLines = 66 ' LevelLineEnum.exLevelMiddleLine Or LevelLineEnum.exLevelSolidLine
			.DrawTickLinesFrom 0,2
		End With
	End With
	.EndUpdate 
End With
929
Is there any property to change the style of the tick lines being shown in the chart

With G2antt1
	.BeginUpdate 
	With .Chart
		.UnitWidth = 24
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(0) = 0
		.LevelCount = 2
		With .Level(0)
			.Alignment = 1
			.Label = "<%dddd%>"
			.DrawTickLines = 2
		End With
		With .Level(1)
			.Label = 65536
			.Count = 6
			.DrawTickLines = 34 ' LevelLineEnum.exLevelUpperHalf Or LevelLineEnum.exLevelSolidLine
		End With
		.DrawLevelSeparator = 2
	End With
	.EndUpdate 
End With
928
Is there any property to change the style of the tick lines being shown in the chart

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(0) = 0
		.LevelCount = 2
		.DrawLevelSeparator = 2
		With .Level(0)
			.Label = "<%dddd%>"
			.DrawTickLines = 2
		End With
		With .Level(1)
			.Label = 65536
			.Count = 6
			.DrawTickLines = 2
		End With
	End With
	.EndUpdate 
End With
927
How can I show the levels based on the base level so tick lines aligns better

With G2antt1
	.BeginUpdate 
	With .Chart
		.AdjustLevelsToBase = True
		.UnitWidth = 24
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(0) = 0
		.LevelCount = 2
		.Level(0).Label = "<%dddd%>"
		With .Level(1)
			.Label = 65536
			.Count = 5
		End With
	End With
	.EndUpdate 
End With
926
How can I show only working hours in other words only the working part of the day

With G2antt1
	.BeginUpdate 
	With .Chart
		.AllowSelectDate = False
		.MarkTodayColor = .BackColor
		.PaneWidth(0) = 0
		.LevelCount = 2
		With .Level(0)
			.Label = "<b><%dddd%></b> <%d%>"
			.Alignment = 1
			.DrawTickLines = False
		End With
		With .Level(1)
			.Label = 65536
			.ReplaceLabel("09") = "<fgcolor=FF0000><b><font ;10>9</font></b></fgcolor>"
		End With
		.NonworkingHours = 16253439
		.ShowNonworkingUnits = False
		.ShowNonworkingDates = False
		.ShowNonworkingHours = False
	End With
	.EndUpdate 
End With
925
How can I specify the effort for bars when displaying the overload histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 52
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 64
		.HistogramView = 112
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern ' .Pattern
			.HistogramType = 0
			.HistogramItems = -6
			.HistogramGridLinesColor = RGB(192,192,192)
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/21/2005#,#6/23/2005#,"","4"
		.ItemBar(h1,"",21) = 4
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task",#6/24/2005#,#6/26/2005#,"",3
		.ItemBar(h1,"",21) = 3
		h1 = .AddItem("Task 3")
		.AddBar h1,"Task",#6/27/2005#,#6/29/2005#,"",2
		.ItemBar(h1,"",21) = 2
		h1 = .AddItem("Task 4")
		.AddBar h1,"Task",#6/30/2005#,#7/2/2005#,"",1
	End With
	.EndUpdate 
End With
924
How can I display the cumulative histogram and showing the bars that generated it using different colors

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 64
		.PaneWidth(0) = 128
		.HistogramView = 1300 ' HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		With .Bars.Item("Task")
			.HistogramPattern = 1
			.HistogramType = 256
			.HistogramCumulativeOriginalColorBars = False
			.HistogramItems = 6
			.HistogramRulerLinesColor = RGB(128,0,0)
			.HistogramBorderColor = RGB(1,0,0)
		End With
	End With
	With .Columns.Add("Column")
		.Def(0) = True
		.PartialCheck = True
	End With
	With .Items
		h = .AddItem("Project 1")
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/5/2001#
		.AddBar .InsertItem(h,,"Item 3"),"Task",#1/4/2001#,#1/6/2001#
		.AddBar .InsertItem(h,,"Item 4"),"Task",#1/2/2001#,#1/8/2001#
		.CellState(.ItemByIndex(1),0) = 1
		.ExpandItem(h) = True
	End With
	.EndUpdate 
End With
923
How can I show the cumulative histogram for my bar

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 64
		.PaneWidth(0) = 128
		.HistogramView = 1300 ' HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		With .Bars.Item("Task")
			.HistogramPattern = 1
			.HistogramType = 256
			.HistogramItems = 6
			.HistogramRulerLinesColor = RGB(128,0,0)
			.HistogramBorderColor = RGB(1,0,0)
		End With
	End With
	With .Columns.Add("Column")
		.Def(0) = True
		.PartialCheck = True
	End With
	With .Items
		h = .AddItem("Project 1")
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/5/2001#
		.AddBar .InsertItem(h,,"Item 3"),"Task",#1/4/2001#,#1/6/2001#
		.AddBar .InsertItem(h,,"Item 4"),"Task",#1/2/2001#,#1/8/2001#
		.CellState(.ItemByIndex(1),0) = 1
		.ExpandItem(h) = True
	End With
	.EndUpdate 
End With
922
How can I show some grid lines or ruler in the histogram

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 64
		.PaneWidth(0) = 78
		.HistogramView = 1300 ' HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		With .Bars.Item("Task")
			.HistogramPattern = 6
			.HistogramItems = 6
			.HistogramRulerLinesColor = RGB(128,0,0)
			.HistogramGridLinesColor = RGB(255,0,0)
		End With
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Project 1")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/5/2001#
		.ExpandItem(h) = True
	End With
End With
921
Is there any property to show some grid lines in the histogram

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 64
		.PaneWidth(0) = 78
		.HistogramView = 1300 ' HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		With .Bars.Item("Task")
			.HistogramPattern = 6
			.HistogramItems = 6
			.HistogramGridLinesColor = RGB(255,0,0)
		End With
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Project 1")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/5/2001#
		.ExpandItem(h) = True
	End With
End With
920
How can I specify a fixed number of bars/items being shown in the histogram

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 64
		.PaneWidth(0) = 78
		.HistogramView = 1300 ' HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		With .Bars.Item("Task")
			.HistogramPattern = 6
			.HistogramCriticalValue = 3
			.HistogramItems = -6
			.HistogramRulerLinesColor = RGB(1,0,0)
		End With
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Project 1")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/5/2001#
		.ExpandItem(h) = True
		h = .AddItem("Project 2")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/4/2001#,#1/7/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/6/2001#,#1/8/2001#
		.ExpandItem(h) = True
		h = .AddItem("Project 3")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/5/2001#
		.ExpandItem(h) = True
		h = .AddItem("Project 4")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/4/2001#,#1/7/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/6/2001#,#1/8/2001#
		.ExpandItem(h) = True
	End With
End With
919
Is there any option to specify a minimum number of bars/items displayed in the histogram

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 64
		.PaneWidth(0) = 78
		.HistogramView = 1300 ' HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		With .Bars.Item("Task")
			.HistogramPattern = 6
			.HistogramItems = 6
			.HistogramGridLinesColor = RGB(1,0,0)
			.HistogramRulerLinesColor = RGB(1,0,0)
		End With
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Project 1")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/5/2001#
		.ExpandItem(h) = True
		h = .AddItem("Project 2")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/4/2001#,#1/7/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/6/2001#,#1/8/2001#
		.ExpandItem(h) = True
	End With
End With
918
How can I show the histogram without grouping the bars based on their parents

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		.HistogramView = 1300 ' HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		.Bars.Item("Task").HistogramPattern = 6
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Project 1")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/5/2001#
		.ExpandItem(h) = True
		h = .AddItem("Project 2")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/4/2001#,#1/7/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/6/2001#,#1/8/2001#
		.ExpandItem(h) = True
	End With
End With
917
How can I show the histogram for checked item and all recursively child items

With G2antt1
	.BeginUpdate 
	With .Chart
		.PaneWidth(False) = 128
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 128
		.HistogramView = 788 ' HistogramViewEnum.exHistogramRecLeafItems Or HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		.Bars.Item("Task").HistogramPattern = 6
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Project")
		.CellHasCheckBox(h,0) = True
		.CellState(h,0) = 1
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/5/2001#
		.ExpandItem(h) = True
		h = .InsertItem(h,,"SubProject")
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/3/2001#,#1/7/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/5/2001#,#1/8/2001#
		.ExpandItem(h) = True
	End With
	.EndUpdate 
End With
916
How can I show the histogram for checked item and its child items

With G2antt1
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		.HistogramView = 276 ' HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		.Bars.Item("Task").HistogramPattern = 6
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Project")
		.CellHasCheckBox(h,0) = True
		.AddBar .InsertItem(h,,"Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .InsertItem(h,,"Item 2"),"Task",#1/3/2001#,#1/7/2001#
		.ExpandItem(h) = True
	End With
End With
915
How can I show the histogram for all items

With G2antt1
	.BeginUpdate 
	.SingleSel = False
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.HistogramVisible = True
		.HistogramHeight = 32
		.HistogramView = 112
		.Bars.Item("Task").HistogramPattern = 6
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#
	End With
	.EndUpdate 
End With
914
How can I prevent selecting a new item when clicking the chart area so my selection is shown in the histogram

With G2antt1
	.SingleSel = False
	With .Chart
		.SelectOnClick = False
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		.HistogramView = 2
		.Bars.Item("Task").HistogramPattern = 6
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#
		.SelectItem(.ItemByIndex(0)) = True
	End With
End With
913
How can I show bars in the histogram for selected items only

With G2antt1
	.SingleSel = False
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		.HistogramView = 2
		.Bars.Item("Task").HistogramPattern = 6
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#
		.SelectItem(.ItemByIndex(0)) = True
	End With
End With
912
How can I change the color and size for the curve in the histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 64
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 68
		With .Bars.Item("Task")
			.HistogramPattern = 258 ' &H100 Or PatternEnum.exPatternDot
			.HistogramBorderColor = RGB(0,255,0)
			.HistogramBorderSize = 5
		End With
	End With
	With .Items
		h1 = .AddItem("Task")
		.AddBar h1,"Task",#6/21/2005#,#6/25/2005#,1,1
		.AddBar h1,"Task",#6/23/2005#,#6/28/2005#,2,2
	End With
	.EndUpdate 
End With
911
How can I change the color for the frame in the histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 64
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 68
		With .Bars.Item("Task")
			.HistogramPattern = 259 ' &H100 Or PatternEnum.exPatternShadow
			.HistogramItems = 5
			.HistogramBorderColor = RGB(255,0,0)
		End With
	End With
	With .Items
		h1 = .AddItem("Task")
		.AddBar h1,"Task",#6/21/2005#,#6/25/2005#,1,1
		.AddBar h1,"Task",#6/23/2005#,#6/28/2005#,2,2
	End With
	.EndUpdate 
End With
910
How can I force the histogram for a bar being shown all the time

With G2antt1
	.BeginUpdate 
	.ScrollBySingleLine = True
	.Columns.Add("Tasks").Def(0) = True
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 64
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 68
		.HistogramView = 20 ' HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramCheckedItems
		With .Bars.Copy("Task","H")
			.Color = RGB(0,255,0)
			.HistogramPattern = 256 ' &H100
			.HistogramItems = 5
			.HistogramColor = .Color
			.HistogramGridLinesColor = RGB(128,128,128)
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
		With .Bars.Item("Task")
			.HistogramCriticalColor = RGB(0,0,128)
			.HistogramPattern = .Pattern ' .Pattern
			.HistogramItems = 5
			.HistogramGridLinesColor = RGB(128,128,128)
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
	End With
	With .Items
		h1 = .AddItem("Hidden")
		.AddBar h1,"H",#6/23/2005#,#6/28/2005#,1
		.AddBar h1,"H",#6/24/2005#,#6/26/2005#,2
		.CellState(h1,0) = 1
		.ItemHeight(h1) = 0
		.SelectableItem(h1) = False
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/21/2005#,#6/25/2005#,1
		.CellState(h1,0) = 1
		h1 = .AddItem("Task 2")
		.CellState(h1,0) = 1
		.AddBar h1,"Task",#6/24/2005#,#7/1/2005#,1
	End With
	.EndUpdate 
End With
909
How can I remove a bar type from the histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 32
		With .Bars.Item("Task")
			.HistogramCriticalColor = RGB(0,0,128)
			.HistogramPattern = .Pattern ' .Pattern
		End With
		With .Bars.Copy("Task","Green")
			.Color = RGB(0,255,0)
			.HistogramPattern = .Pattern ' .Pattern
		End With
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Green",#6/22/2005#,#6/26/2005#,0
		.AddBar h1,"Task",#6/21/2005#,#6/25/2005#,1
		.ItemBar(h1,1,18) = 3
		h1 = .AddItem("Task 2")
		.AddBar h1,"Green",#6/28/2005#,#6/30/2005#,0
		.AddBar h1,"Task",#6/27/2005#,#7/1/2005#,1
		.ItemBar(h1,1,18) = 3
	End With
	With .Chart.Bars.Item("Green")
		.HistogramColor = .Color
		.HistogramPattern = 0
	End With
	.EndUpdate 
End With
908
How can I show the two buttons in the vertical splitter but still resizes the chart when the control gets resized

With G2antt1
	.OnResizeControl = 513 ' OnResizeControlEnum.exSplitterShowButtons Or OnResizeControlEnum.exResizeChart
	.Chart.PaneWidth(False) = 96
	.Chart.LevelCount = 2
End With
907
I have seen a screen shot on your web page that shows two buttons on the vertical scroll bar. How can I show them
With G2antt1
	.OnResizeControl = 512
	.Chart.PaneWidth(False) = 96
End With
906
How can I disable selecting a new item once the user clicks the chart area

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	.SingleSel = False
	With .Chart
		.SelectOnClick = False
		.AllowCreateBar = 1
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 32
		.HistogramView = 2
		.Bars.Item("Task").HistogramPattern = 1
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/22/2005#,#6/26/2005#,0
		.SelectItem(h1) = True
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task",#6/24/2005#,#6/30/2005#,0
		.SelectItem(h1) = True
	End With
	.EndUpdate 
End With
905
Is there any option to display the chart's header in the bottom side of the histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramView = 112
		.HistogramHeight = 96
		.HistogramHeaderVisible = True
		With .Bars.Item("Task")
			.Color = RGB(0,0,255)
			.OverlaidType = 1
			.OverlaidGroup = "Task2"
			.HistogramCriticalColor = RGB(0,0,128)
			.HistogramPattern = 512
			.HistogramType = 1
		End With
		With .Bars.Copy("Task","Task2")
			.Color = RGB(0,255,0)
			.OverlaidType = 1
			.OverlaidGroup = "Task"
			.HistogramCriticalColor = RGB(0,128,0)
			.HistogramPattern = 512
			.HistogramType = 1
		End With
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task2",#6/22/2005#,#6/26/2005#,0
		.AddBar h1,"Task",#6/21/2005#,#6/25/2005#,1
		.ItemBar(h1,0,21) = 3
		.ItemBar(h1,1,21) = 4
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task2",#6/28/2005#,#6/30/2005#,0
		.AddBar h1,"Task",#6/27/2005#,#7/1/2005#,1
		.ItemBar(h1,0,21) = 4
		.ItemBar(h1,1,21) = 1
	End With
	.EndUpdate 
End With
904
How can I display the child bars as soon as an item gets collapsed

With G2antt1
	.BeginUpdate 
	.LinesAtRoot = -1
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.ShowCollapsedBars = True
		.LevelCount = 2
		.PaneWidth(0) = 96
	End With
	With .Items
		h = .AddItem("Project 1")
		h1 = .InsertItem(h,,"Task 1")
		.AddBar h1,"Task",#9/21/2006#,#9/23/2006#,"A"
		h2 = .InsertItem(h,,"Task 2")
		.AddBar h2,"Task",#9/24/2006#,#9/26/2006#,"B"
		h3 = .InsertItem(h,,"Task 3")
		.AddBar h3,"Task",#9/27/2006#,#9/29/2006#,"C"
		h = .AddItem("Project 2")
		h1 = .InsertItem(h,,"Task 1")
		.AddBar h1,"Task",#9/21/2006#,#9/23/2006#,"A"
		h2 = .InsertItem(h,,"Task 2")
		.AddBar h2,"Task",#9/24/2006#,#9/26/2006#,"B"
		h3 = .InsertItem(h,,"Task 3")
		.AddBar h3,"Task",#9/27/2006#,#9/29/2006#,"C"
		.ExpandItem(h) = True
	End With
	.EndUpdate 
End With
903
What exBarEffort property represents

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/9/2005#
		.HistogramVisible = True
		.HistogramView = 112
		.HistogramHeight = 164
		With .Bars.Item("Task")
			.HistogramPattern = 256 ' &H100
			.HistogramType = 1
		End With
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/10/2005#,#6/11/2005#,,"1/1=<b>100%"
		.ItemBar(h1,,4) = 18
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task",#6/12/2005#,#6/14/2005#,,"1/2=<b>50%"
		.ItemBar(h1,,4) = 18
		h1 = .AddItem("Task 3")
		.AddBar h1,"Task",#6/15/2005#,#6/18/2005#,,"1/3=<b>33%"
		.ItemBar(h1,,4) = 18
		h1 = .AddItem("Task 4")
		.AddBar h1,"Task",#6/19/2005#,#6/23/2005#,,"1/4=<b>25%"
		.ItemBar(h1,,4) = 18
		h1 = .AddItem("Task 5")
		.AddBar h1,"Task",#6/24/2005#,#6/29/2005#,,"1/5=<b>20%"
		.ItemBar(h1,,4) = 18
	End With
	.EndUpdate 
End With
902
Can I display multiple curves in the histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramView = 112
		.HistogramHeight = 64
		With .Bars.Item("Task")
			.Color = RGB(0,0,255)
			.OverlaidType = 1
			.OverlaidGroup = "Task2"
			.HistogramCriticalColor = RGB(0,0,128)
			.HistogramPattern = 512
			.HistogramType = 1
		End With
		With .Bars.Copy("Task","Task2")
			.Color = RGB(0,255,0)
			.OverlaidType = 1
			.OverlaidGroup = "Task"
			.HistogramCriticalColor = RGB(0,128,0)
			.HistogramPattern = 512
			.HistogramType = 1
		End With
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task2",#6/22/2005#,#6/26/2005#,0
		.AddBar h1,"Task",#6/21/2005#,#6/25/2005#,1
		.ItemBar(h1,0,21) = 3
		.ItemBar(h1,1,21) = 4
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task2",#6/28/2005#,#6/30/2005#,0
		.AddBar h1,"Task",#6/27/2005#,#7/1/2005#,1
		.ItemBar(h1,0,21) = 4
		.ItemBar(h1,1,21) = 1
	End With
	.EndUpdate 
End With
901
How can I use the exBarEffort property

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 64
		.HistogramView = 112
		With .Bars.Item("Task")
			.HistogramCriticalColor = RGB(255,0,0)
			.HistogramPattern = 512
			.HistogramType = 1
		End With
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/21/2005#,#6/25/2005#
		.ItemBar(h1,"",21) = 4
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task",#6/27/2005#,#7/1/2005#
		.ItemBar(h1,"",21) = 1
	End With
	.EndUpdate 
End With